-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pylint to 2.16 #1042
Update pylint to 2.16 #1042
Conversation
c1bc454
to
2d77f3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good, thanks! I wonder if we should add pre-commit hooks for linting or if people still prefer to be able to commit quickly.
.pylintrc
Outdated
# Regular expression matching correct constant names | ||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ | ||
|
||
# Naming hint for constant names | ||
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ | ||
|
||
# Regular expression matching correct class names | ||
class-rgx=[A-Z_][a-zA-Z0-9]+$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since pylint enforces PEP8 name conventions by default, do we need these custom regexes? Are there names we're using now that don't comply with PEP8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a case of generating the default pylintrc with pylint and then modifying it, so these custom regexes just match the pylint default. We can try removing more stuff from the file. I just removed what I did because pylint was complaining that those options were no longer valid.
pylint has changed some defaults and removed some checkers since version 2.7 to be more in line with things like black.
Summary
This change set updates pylint from 2.7 to 2.16. The code was modified to satsify new checks added to pylint between those versions. Obsolete settings were removed from the pylintrc file.
Details and comments
The old version of pylint produces false positives that were fixed in a later version than 2.7.